import request from '@/utils/request';
const apiUrls = {
  getPlantProduce: '/front/plant/produce',
  getFunction: '/front/plant/function',
  getRice: '/front/plant/rice',
  getPlantGrain: '/front/plant/grain',
  getPlantCenter: '/front/plant/center',
};
export function getPlantProduce(cropType, areaCode) {
  return request({
    url: `${apiUrls.getPlantProduce}?cropType=${cropType}&areaCode=${areaCode}`,
    method: 'get',
  });
}

export function getFunction(data) {
  return request({
    url: `${apiUrls.getFunction}?areaCode=${data}`,
    method: 'get',
  });
}
export function getRice(data) {
  return request({
    url: `${apiUrls.getRice}?areaCode=${data}`,
    method: 'get',
  });
}
export function getPlantGrain(data) {
  return request({
    url: `${apiUrls.getPlantGrain}?areaCode=${data}`,
    method: 'get',
  });
}
export function getPlantCenter(data) {
  return request({
    url: `${apiUrls.getPlantCenter}?areaCode=${data}`,
    method: 'get',
  });
}